You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
medium — src/config.ts:104-114 (disconnectCloud) rmSync(current.eventSpoolPath, { force: true }) and rmSync(current.policyCachePath, { force: true }) delete paths derived from config without any validation. If the config file is tampered with, these fields could point outside the AgentGuard data directory and cause unintended file deletion. Fix: Validate that both paths resolve under AGENTGUARD_HOME/the expected AgentGuard root before deleting, and refuse to delete otherwise.
medium — src/config.ts:104-114 and src/cli.ts:94-104
The new disconnect command only removes apiKey and connectedAt, but leaves other Cloud-related state intact. If saveConfig preserves a stale cloudUrl and related connection metadata is still used elsewhere, the CLI can report a disconnected state while parts of the runtime still behave as if Cloud is configured. Fix: Audit all Cloud-dependent fields and ensure disconnect clears or invalidates every field that can trigger Cloud communication, or explicitly document and enforce that only the URL remains and cannot be used for reconnect/telemetry without a key.
low — src/tests/runtime-cloud.test.ts:60-96
The new test writes a fake auditPath file and asserts it survives disconnect, but disconnectCloud() never touches audit files. This test does not verify the actual security-sensitive behavior introduced by the patch and could miss regressions in the cleanup logic. Fix: Add assertions for the config file contents after disconnect and for path containment/validation behavior on spool and policy cache paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
agentguard disconnectto remove the local Cloud connection credentials while keeping local protection active.The command:
apiKeyandconnectedAtfrom local configcloudUrlfor future reconnectsAlso updates the AgentGuard skill CLI documentation and exports
disconnectCloud().Type
Testing
npm run buildnode --test dist/tests/runtime-cloud.test.jsnpm test